package zjt.enum1;

public class demo1 {
    public static void main(String[] args) {

    }
}
enum Grade {
    A,B,C;
}

enum Grade1 {
    A("85-100"),B("75-84"),C("60-74");
    private String score;
    private Grade1(String score){
        this.score = score;
    }
    public String getScore() {
        return score;
    }
    public void setScore(String score) {
        this.score = score;
    }
}

interface GradeInter{
    public abstract String getStr();
}
enum Grade3 implements GradeInter{
    A("85-100"){
        //6.如果每个实例实现接口的抽象方法的行为不同，可以在每个实例中重写抽象方法
        @Override
        public String getStr() {
            return "优秀";
        }
    },B("75-84"){
        @Override
        public String getStr() {
            return "良好";
        }
    },C("60-74"){
        @Override
        public String getStr() {
            return "及格";
        }
    };
    private String score;

    private Grade3(String score){
        this.score = score;
    }

    public String getScore() {
        return score;
    }
    public void setScore(String score) {
        this.score = score;
    }

    @Override
    public String getStr() {
        return "一致的描述，考试合格";
    }
}
enum Season {

    SPRINGTIME,SUMMER,AUTUMN,WINTER;
}
class SeasonDemo {
    public static void main(String[] args) {
        switch(Season.SPRINGTIME){
            case SPRINGTIME:
                System.out.println("春天");
                break;
            case SUMMER :
                System.out.println("夏天");
                break;
            case AUTUMN :
                System.out.println("秋天");
                break;
            case WINTER :
                System.out.println("冬天");
                break;
        }
    }
}